* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 20px;
}

.form-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    backdrop-filter: blur(10px);
}

.title {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

.student-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 16px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #28a745;
    font-weight: 500;
}

.students-list {
    border-top: 2px solid #e1e5e9;
    padding-top: 25px;
}

.students-list h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
}

.student-card {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.student-card:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.student-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.student-class {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.student-time {
    color: #6c757d;
    font-size: 12px;
}

/* 摄像头和照片相关样式 */
.camera-container {
    margin-top: 10px;
    border: 2px dashed #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
}

.camera-placeholder {
    padding: 40px 20px;
}

.camera-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.camera-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(40, 167, 69, 0.3);
}

.camera-preview {
    position: relative;
}

.video-preview {
    width: 100%;
    max-width: 400px;
    height: 300px;
    border-radius: 8px;
    background: #000;
    object-fit: cover;
}

.camera-controls {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.capture-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.captured-photo {
    position: relative;
}

.photo-preview {
    width: 100%;
    max-width: 300px;
    height: 200px;
    border-radius: 8px;
    object-fit: cover;
    border: 3px solid #28a745;
}

.photo-controls {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.retake-btn {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.clear-btn {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.capture-btn:hover,
.cancel-btn:hover,
.retake-btn:hover,
.clear-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 导航链接样式 */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.nav-link {
    text-decoration: none;
    color: #6c757d;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.nav-link:hover {
    color: #495057;
    background: #e9ecef;
}

.nav-link.active {
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

/* 签到相关样式 */
.signin-form {
    margin-bottom: 30px;
}

.signin-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.signin-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(40, 167, 69, 0.3);
}

.signin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #dc3545;
    font-weight: 500;
}

/* 签到记录样式 */
.signin-records {
    border-top: 2px solid #e1e5e9;
    padding-top: 25px;
    margin-top: 25px;
}

.signin-records h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.signin-card {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.signin-card:hover {
    background: #e9ecef;
    transform: translateX(3px);
}

.signin-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
    flex: 1;
}

.signin-time {
    color: #6c757d;
    font-size: 14px;
    margin: 0 15px;
}

.signin-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.signin-status.success {
    background: #d4edda;
    color: #155724;
}

.signin-status.warning {
    background: #fff3cd;
    color: #856404;
}

.signin-status.error {
    background: #f8d7da;
    color: #721c24;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .form-container {
        padding: 25px;
    }
    
    .title {
        font-size: 24px;
    }
    
    .student-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .student-class {
        align-self: flex-start;
    }
    
    .video-preview {
        max-width: 100%;
        height: 250px;
    }
    
    .photo-preview {
        max-width: 100%;
        height: 180px;
    }
    
    .camera-controls,
    .photo-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .camera-controls button,
    .photo-controls button {
        width: 200px;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-link {
        text-align: center;
    }
    
    .signin-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .signin-time {
        margin: 0;
    }
    
    .signin-status {
        align-self: flex-start;
    }
}
